package com.rjj.wlqq.wxpay.wxpay.tool;

import java.util.Map;

/**
 * @author r
 * @date 2021/1/19 11:25
 */
public class XmlKit
{
    /**
     * Map转xml数据
     */
    public static String GetMapToXML(Map<String, String> param)
    {
        StringBuffer sb = new StringBuffer();
        sb.append("<xml>");
        for (Map.Entry<String, String> entry : param.entrySet())
        {
            sb.append("<" + entry.getKey() + ">");
            sb.append(entry.getValue());
            sb.append("</" + entry.getKey() + ">");
        }
        sb.append("</xml>");
        return sb.toString();
    }
}
